!!! 5
html
  head
    include ../head
    link(href='#{assets_head}/css/Markdown.Editor.css?ddd2', type='text/css', rel='stylesheet', charset='utf-8')
    script(src='#{assets_head}/js/jquery.js')
    script(src='#{assets_head}/js/pcaunzip.js')
    include ../editor_head
    title 添加职位
    style
      #content textarea{
      height:200px;
      }
  body#job
    - locals.pageId=50;
    include ../header
    #content.clearfix
      .content
        .left
          .module
            form.form-horizontal#form(method='post')
              fieldset
                if locals.job
                  legend 编辑职位
                else
                  legend 添加职位
                if locals.job
                  input(type='hidden', value = "#{job.id}",name='id')
                input(type='hidden', value = "#{user.id}",name='user_id')
                .control-group
                  input#title.input-xlarge(type='text', value = "#{locals.job?locals.job.title:''}",name='title', placeholder='招聘标题',required)
                .control-group
                  input#email.input-xlarge(type='text', value = "#{locals.job?locals.job.email:''}",name='email', placeholder='邮箱Email地址，接收简历',required)
                .control-group
                  input#company_name.input-xlarge(type='text', value = "#{locals.job?locals.job.company_name:''}",name='company_name', placeholder='公司名称',required)
                .control-group
                  input#company_personcount.input-xlarge(type='text', value = "#{locals.job?locals.job.company_personcount:''}",name='company_personcount', placeholder='公司人数范围')
                .control-group
                  input#zhiwei.input-xlarge(type='text', value = "#{locals.job?locals.job.zhiwei:''}",name='zhiwei', placeholder='招聘职位',required)
                .control-group
                  input#zhaopin_personcount.input-xlarge(type='text', value = "#{locals.job?locals.job.zhaopin_personcount:''}",name='zhaopin_personcount', placeholder='招聘人数')
                .control-group
                  input#zhaopin_jingyan.input-xlarge(type='text', value = "#{locals.job?locals.job.zhaopin_jingyan:''}",name='zhaopin_jingyan', placeholder='工作经验要求')
                .control-group
                  label 薪资范围
                  - var minprices = [2000,3000,4000,5000,7000,9000,10000,12000,15000,17000,20000,25000,30000];

                  select#min_price(name="min_price",value="#{locals.job?locals.job.min_price:''}")
                    option(value="0") 请选择
                    each p in minprices
                      |<option value="#{p}" #{locals.job?(locals.job.min_price==p?'selected=\'selected\'':''):''}>#{p}</option>
                    
                  | - 
                  select#max_price(name="max_price",value="#{locals.job?locals.job.max_price:''}")
                    option(value="0") 请选择
                    option(value="2000") 2000
                    option(value="3000") 3000
                    option(value="4000") 4000
                    option(value="5000") 5000
                    option(value="7000") 7000
                    option(value="9000") 9000
                    option(value="10000") 10000
                    option(value="12000") 12000
                    option(value="15000") 15000
                    option(value="17000") 17000
                    option(value="20000") 20000
                    option(value="25000") 25000
                    option(value="30000") 30000
                    option(value="40000") 40000
                    option(value="50000") 50000
                .control-group
                  select#company_country( value = "#{locals.job?locals.job.company_country:''}",name='company_country',required)
                  select#company_city( value = "#{locals.job?locals.job.company_city:''}",name='company_city',required)
                
                  
                .tab-pane#seeeditor
                    .control-group
                      label 公司简介
                      script(type="text/plain",id="company_desc")
                .tab-pane#seeeditor
                    .control-group
                      label 职位要求
                      script(type="text/plain",id="job_desc")
                
                .control-group
                  button.btn(type='submit') 添加
          
      .right 
        .module
          .hd 提示
          .bd 
            //- div 提交专栏添加申请后，需要管理员审核后方能使用。
            //- div 专栏可以设置私有和共有。
            div 请准确填写所有信息，提交后需要审核才会显示
            div 如要置顶或者推广，请联系微信：mier963
      #fullscreen-editor.hidden
      #fullscreen-exit.hidden 
        a.btn
          i.icon-resize-small
    include ../footer
    script(src='#{assets_head}/js/ajaxfileupload.js')
    script(src='#{assets_head}/js/loadingTip.js')
    script(src='#{assets_head}/js/messageTip.js')
    script
      UE.getEditor('company_desc',{
            //这里可以选择自己需要的工具按钮名称,此处仅选择如下五个
            //focus时自动清空初始化时的内容
            autoClearinitialContent:true,
            //关闭字数统计
            wordCount:false,
            //关闭elementPath
            elementPathEnabled:false,
            //默认的编辑区域高度
            initialFrameHeight:100,
            content:"",
            initialContent:"!{locals.job?locals.job.company_desc:''}",
            textarea:"company_desc"
            //更多其他参数，请参考ueditor.config.js中的配置项
        })
      UE.getEditor('job_desc',{
            //这里可以选择自己需要的工具按钮名称,此处仅选择如下五个
            //focus时自动清空初始化时的内容
            autoClearinitialContent:true,
            //关闭字数统计
            wordCount:false,
            //关闭elementPath
            elementPathEnabled:false,
            //默认的编辑区域高度
            initialFrameHeight:300,
            textarea:"zhaopin_desc",
            initialContent:"!{locals.job?locals.job.zhaopin_desc:''}",
            autoClearinitialContent:0
            //更多其他参数，请参考ueditor.config.js中的配置项
        })
      new PCAS("company_country","company_city","#{locals.job?locals.job.company_country:''}","#{locals.job?locals.job.company_city:''}")

      